<%@ page contentType="text/html;charset=utf-8"%>
<%@page import="com.leruan.aasimp.entity.UserTypeEnumEntity"%>
<%@page import="com.leruan.aasimp.entity.Eauser;"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
    <base href="<%=basePath%>">
<TITLE>注册新用户 - </TITLE>
<LINK href="mok/forum/styles/green/ejforum.css" type=text/css rel=stylesheet>
</HEAD>
<BODY onkeydown="if(event.keyCode==27) return false;" onload="loaded()">
<SCRIPT src="mok/forum/js/common.js" type=text/javascript></SCRIPT>
<SCRIPT src="mok/forum/js/member.js" type=text/javascript></SCRIPT>
<SCRIPT src="mok/forum/js/ajax.js" type=text/javascript></SCRIPT>
<SCRIPT src="mok/forum/js/md5.js" type=text/javascript></SCRIPT>
<DIV class=wrap>
<DIV id=header>
<FORM name="register" onsubmit="return checkfields();" action="aasimp/Eauser_updatePwd" method="post">
<INPUT type=hidden name=fromPath value="">
<DIV class="mainbox formbox"><SPAN class=headactions></SPAN> 
<H1>修改密码</H1>
<TABLE cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TH><LABEL for=pwd0>旧密码 *</LABEL></TH> 
    <TD><INPUT id=pwd0 tabIndex=4 type=password maxLength=15 size=25 name=pwd0> 
	  <INPUT type=hidden id="password1" name="password1"> <SPAN id=checkpwd0>&nbsp;</SPAN></TD></TR>
  <TR>
    <TH><LABEL for=pwd1>新密码 *</LABEL></TH> 
    <TD><INPUT id=pwd1 tabIndex=4 type=password maxLength=15 size=25 name=pwd1> 
	  <INPUT type=hidden id="password" name="password"> <SPAN id=checkpwd>&nbsp;</SPAN></TD></TR>
  <TR>
    <TH><LABEL for=pwd2>确认密码 *</LABEL></TH>
    <TD><INPUT id=pwd2 onblur=checkpwd2() tabIndex=5 type=password maxLength=15 size=25 name=pwd2><SPAN id=checkpwd2>&nbsp;</SPAN></TD>
 </TR>
</TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TH>&nbsp;</TH>
    <TD height="30">
	<BUTTON class=submit tabIndex=100 name=regsubmit type=submit disabled id=regsubmit style="color:gray">提交</BUTTON>
    </TD></TR></TBODY></TABLE></DIV></FORM>
<SCRIPT type=text/javascript>
var verifycode_invalid = '验证码输入错误，请重新填写';
var passwd_dismatch = '两次输入的密码不一致，请检查后重试';
var lastuserID = lastpwd = lastemail = '';

$('username').focus();

function checkfields() 
{
	if (trim($('pwd0').value) == '')
	{
		warning($('checkpwd0'), '请输入新密码');
		return false;
	}
	if (trim($('pwd1').value) == '')
	{
		warning($('checkpwd'), '请输入旧密码');
		return false;
	}
	if (!checkpwd2())
	{
		return false;
	}
	$('password').value = hex_md5(trim($('pwd1').value)); 
	register.regsubmit.disabled = true;
}


function ajaxcheck(objId, data) {
   	var x = new Ajax();
   	x.get('ajax?' + data, function(s){
   	        var obj = $(objId);
   	        if(s == 'OK') {
     	        obj.style.display = '';
       	        obj.innerHTML = '&nbsp;';
        		obj.className = "passed";
       		} else {
       			warning(obj, s);
       		}
   	});
}
function agreerule() {
		$("regsubmit").disabled = false;
		$("regsubmit").style.color = "#090";
}
function loaded() {
	if("${message}"!=""){
		alert("${message}");
	}
	agreerule();
}	
</SCRIPT>
</DIV>
</BODY></HTML>
